<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>期货交易系统主页</title>
    <script src="/static/scripts.js"></script>
    <link rel="stylesheet" href="/static/style.css">
</head>
<body>

<div class="container">
    <div class="sidebar">
        <table>
            <tr>
                <th>序号</th>
                <th>策略名称</th>
            </tr>
            <tr>
                <td>0:</td>
                <td><a href="http://180.166.182.14:9201/">index</a></td>
            </tr>
            <tr>
                <td>1:</td>
                <td><a href="http://180.166.182.14:9201/show/ArbStrategy_5">ArbStrategy_5</a></td>
            </tr>
            <tr>
                <td>2:</td>
                <td><a href="http://180.166.182.14:9201/show/BigOrderTrader_1">BigOrderTrader_1</a></td>
            </tr>
            <tr>
                <td>3:</td>
                <td><a href="http://180.166.182.14:9201/show/ArbStrategy_3">ArbStrategy_3</a></td>
            </tr>
            <tr>
                <td>4:</td>
                <td><a href="http://180.166.182.14:9201/show/FishTrader_1">FishTrader_1</a></td>
            </tr>
            <tr>
                <td>5:</td>
                <td><a href="http://180.166.182.14:9201/show/CashTrader_1">CashTrader_1</a></td>
            </tr>
            <tr>
                <td>6:</td>
                <td><a href="http://180.166.182.14:9201/show/ArbTrader_Man">ArbTrader_Man</a></td>
            </tr>
            <tr>
                <td>7:</td>
                <td><a href="http://180.166.182.14:9201/show/MATrader_1">MATrader_1</a></td>
            </tr>
            <tr>
                <td>8:</td>
                <td><a href="http://180.166.182.14:9201/showFinRate">FinanceRate</a></td>
            </tr>
        </table>
        <hr>
        <table>
            <tr>
                <th>合约</th>
                <th>信息量</th>
            </tr>
            {{#allInformation}}
            <tr>
            <td>
                {{contractCode}}
            </td>
            <td>
                {{information}}
            </td>
            </tr>
            {{/allInformation}}
        </table>
    </div>
    <div class="content">
        <table style="text-align: center">
            <tr>
                <td>进入时间:{{traderTime}}</td>
                <td>本地偏移:{{lastOffset}}</td>
                <td>最新token:{{maxToken}}</td>
                <td>
                    <button onclick="operateAll(1)" type="submit">启动策略</button>
                </td>
                <td>
                    <button onclick="operateAll(2)" type="submit">停止策略</button>
                </td>
                <td>
                    <button onclick="operateAll(3)" type="submit">存储策略</button>
                </td>
                <td>
                    <button onclick="operateAll(-1)" type="submit">终止程序</button>
                </td>
            </tr>
        </table>
        <hr>
        <h3 style="text-align: center">所有策略</h3>
        <table>
            <tr>
                <td>操作</td>
                <td>id</td>
                <td>名称</td>
                <td>合约</td>
                <td>运行</td>
                <td>手数</td>
                <td>行情数</td>
                <td>变动单位</td>
                <td>持仓</td>
                <td>成交数量</td>
                <td>成交限制</td>
                <td>到期日</td>
                <td>交易期限</td>
                <td>错误ID</td>
                <td>删除按钮</td>
            </tr>
            {{#strategies}}
            <tr>
                <td>
                    <button onclick="start_Strategy('{{strategyId}}')">启动</button>
                </td>
                <td>{{strategyId}}</td>
                <td>{{strategyName}}</td>
                <td>{{#contractCodes}} {{.}} {{/contractCodes}}</td>
                <td>{{isActive}}</td>
                <td style="width:60px"><input style="width: 55px" value="{{openSS}}"
                                              onchange="modifyIntValue('{{strategyId}}', this.value, 'openSS')"/></td>
                <td>{{mdTimes}}</td>
                <td>{{minMove}}</td>
                <td>{{position}}</td>
                <td>{{dealVol}}</td>
                <td style="width:60px"><input style="width: 55px" value="{{dealLimit}}"
                                              onchange="modifyIntValue('{{strategyId}}', this.value, 'dealLimit')"/>
                </td>
                <td>{{expire}}</td>
                <td style="width:60px"><input style="width: 55px" value="{{limitDate}}"
                                              onchange="modifyIntValue('{{strategyId}}', this.value, 'limitDate')"/>
                </td>
                <td>{{errorId}}</td>
                <td>
                    <button onclick="del_Strategy('{{strategyId}}')">删除</button>
                </td>
            </tr>
            {{/strategies}}
        </table>
    </div>
</div>
</body>
</html>